﻿using FluentNHibernate.Mapping;
using MediaMover.Common.TV;

namespace MediaMover.Data.NHIbernate.Mappings
{
    public class ShowMap : ClassMap<Show>
    {
        public ShowMap()
        {
            Table("Shows");
            Id(x=>x.Id,"ShowID");
            HasMany(x => x.Seasons).KeyColumn("ParentID").Cascade.AllDeleteOrphan().Not.LazyLoad();
            Map(x => x.BaseFolder);
            Map(x => x.Description);
            Map(x => x.SaveBySeason);
            Map(x => x.SeasonFolderFormat);
            Map(x => x.Title);
        }
    }
}
